Update go_library build rule to compile assembly files individually#330
Merged
chrisnovakovic merged 8 commits intoplease-build:masterfrom Nov 5, 2025
Merged
Conversation
Contributor
|
Thanks, Kelvin - I've made some minor improvements to how the |
chrisnovakovic
approved these changes
Nov 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, when compiling a Go package with Assembly files, the
go_librarybuild rule invokesgo tool asmonce on all Assembly files in the package. However, this caused errors that look like the below when multiple files declare symbols with the same name.This is despite the
<>suffix after the offending symbol name, which should've been enough to make the symbol visible in that file only from the perspective ofgo tool asm.When building this same package without Please (i.e. just with
go build), we don't run into these errors - it looks like this is because the Go tool invokesgo tool asmon each Assembly individually:So this PR updates the
go_librarybuild def's behaviour to more closely match the behaviour in the Go tool.I was able to reproduce these errors by adding the new unit tests in this PR. The errors were fixed by my updates to the
go_librarybuild def.